home *** CD-ROM | disk | FTP | other *** search
Wrap
100 gosub820:poke 53280,6:poke 53281,6:print chr$(8)"[147][154]"spc(14)"match blox" 110 l$(1)="[129][207][183][208][157][157][157][180] [170][157][157][157][204][175][186][146][145][145]":l$(2)="[154]"+right$(l$(1),21) 120 na$(1)="uni-color":na$(2)=" cross":na$(3)="no center" 130 na$(4)="4 corners":na$(5)=" 5 points":mv$="moves" 140 dim y(10),p$(10),cl(5,9):for i=1 to 9:read v(i,1),v(i,2),v(i,3),v(i,4) 150 next:mt=1:up=8:dn=14:lm=16:rm=22:te=5:qx=11:qy=19:mv=-1:q=14:x=8:p=0 160 for c=1 to 9:y(c)=x:p$(c)=l$(2):z=int(10*rnd(1)) 170 if z<=5 then y(c)=q:p$(c)=l$(1) 180 next 190 t$="[207][208][157][157][204][186][145]":for rx=1 to 5:for i=1 to 9:cl(rx,i)=8:next i,rx 200 for i=1 to 9:cl(1,i)=14:cl(3,i)=14:next:cl(3,5)=8 210 cl(2,2)=14:cl(2,4)=14:cl(2,5)=14:cl(2,6)=14:cl(2,8)=14 220 cl(4,1)=14:cl(4,3)=14:cl(4,7)=14:cl(4,9)=14 230 cl(5,1)=14:cl(5,3)=14:cl(5,5)=14:cl(5,7)=14:cl(5,9)=14 240 print spc(12)"[155][175][157][157][170]1[146][180][157][157][183][145][154] uni-color":print spc(12); 250 print"[155][175][157][157][170]2[146][180][157][157][183][145][154] cross":printspc(12)"[155][175][157][157][170]3[146][180][157][157][183][145][154] no center" 260 print spc(12)"[155][175][157][157][170]4[146][180][157][157][183][145][154] 4 corners" 270 print spc(12)"[155][175][157][157][170]5[146][180][157][157][183][145][154] 5 points" 280 print tab(12);"your choice[145] [155][175][157][157][170] [146][180][157][157][183][154]" 290 s=127-peek(56320):if s=4 then mt=mt-1:if mt<1 then mt=1 300 if s=8 then mt=mt+1:if mt>5 then mt=5 310 if s>=15 then dz=mt:gk=mt:goto 330 320 poke 1929,mt+176:poke 56201,15:goto 290 330 print chr$(31)"[147]"; 340 for i=0 to 23:print" " 350 mm=1063+(40*i):poke mm,160:poke mm+54272,6:next:poke 2023,160:poke 56295,6 360 print" ":poke 53281,15 370 print"";:print spc(15)""na$(gk)"" 380 print""spc(3)"match[157][157][157]blox" 390 e=1:f=3:print"":for bj=1 to 3:print spc(31);:for ai=e to f 400 poke 646,cl(gk,ai):print t$;:next:e=e+3:f=f+3:print"":next 410 gosub 420:goto 450 420 print""tab(15)""p$(1)p$(2)p$(3):print""tab(15)""p$(4)p$(5)p$(6) 430 print""tab(15)""p$(7)p$(8)p$(9) 440 poke 782,qy:poke 781,qx:poke 783,0:sys 65520:print"[144][166][157]";:return 450 mv=mv+1:u=0:for c=1 to 9:if y(c)=x then u=u+1 460 next:if tc=1 then tc=0:mv=mv-1 470 if mv>0 then print""spc(16)"move"mv:gosub 440 480 if gk=1 and u=9 then 750 490 if u=9 then 780 500 if gk=2 and u=5 and y(2)+y(4)+y(5)+y(6)+y(8)=40 then 750 510 if gk=3 and u=8 and y(5)=14 then 750 520 if gk=4 and u=4 and y(1)+y(3)+y(7)+y(9)=32 then 750 530 if gk=5 and u=5 and y(1)+y(3)+y(5)+y(7)+y(9)=40 then 750 540 goto 610 550 p=u:if y(u)=x then tc=1:gosub 420:goto 450 560 w(1)=v(u,1):w(2)=v(u,2):w(3)=v(u,3):w(4)=v(u,4) 570 for g=1 to 4:w=0:if y(w(g))=x then w=1 580 if w=1 then y(w(g))=q:p$(w(g))=l$(1) 590 if w=0 and y(w(g))=q then y(w(g))=x:p$(w(g))=l$(2) 600 next:y(u)=x:p$(u)=l$(2):gosub420:goto450 610 poke 204,0:jy=15-peek(56320)and15:jb=16-peek(56320)and16 620 if jb=0 then gosub 820:u=te:goto 550 630 if jy=8 then jy=3 640 if jy<1 orjy>4 then 610 650 gosub 820:on jy goto 660,680,700,720 660 if qx=up then 610 670 qx=qx-3:te=te-3:goto 740 680 ifqx=dn then 610 690 qx=qx+3:te=te+3:goto 740 700 if qy=rm then 610 710 qy=qy+3:te=te+1:goto 740 720 if qy=lm then 610 730 qy=qy-3:te=te-1 740 gosub 420:goto 610 750 if mv=1 then mv$="move" 760 gosub 830:print" you solved it in"mv;mv$:s1=30:s2=20:s3=-1 770 gosub 840:goto 800 780 gosub 830:print" no moves available...game over":s1=17:s2=35:s3=1 790 gosub 840 800 print" press firebutton to play again" 810 wait 56320,16,16:for i=54272 to 54287:poke i,0:next:run 820 poke 204,1:poke 207,0:return 830 gosub 440:print"[154] ":return 840 poke 54296,15:poke 54295,0:poke 54273,40:poke 54278,240:poke 54277,0 850 poke 54276,17:for a=s1 to s2 step s3:for b=a to 60-a 860 poke 54273,b:next b,a:poke 54273,3:poke 54276,0:return 870 data 2,4,5,10,1,3,10,10,2,5,6,10,1,7,10,10,2,4,8,6,3,9,10,10,4,5,8,10,7,9 880 data 10,10,8,5,6,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,240,0,3,248,0,7,252,0 890 data 7,252,0,7,252,0,3,248,0,1,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 900 data 0,0,0,0,0,0,0,0,0,190